﻿<%@ Page Title="Page d'accueil" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="WebFormServiceRSA.aspx.cs" Inherits="WebServiceRequester.WebFormServiceRSA" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 35px;
        }
        .style2
        {
            width: 139px;
        }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
    <h1>RSA</h1>
    <div>
        <h2>Génératation de clé</h2>
        <table style="width: 311px">
            <tr>
                <td class="style1">p</td>
                <td class="style2"><asp:Label ID="lbl_p" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td class="style1">q</td>
                <td class="style2"><asp:Label ID="lbl_q" runat="server" Text=""></asp:Label></td>
            </tr>
        </table>
        <div>
            <p>Phi(n) : 
                <asp:Label ID="lbl_phin" runat="server" Text=""></asp:Label></p>
            <p>Clé publique (n,c) : 
                <asp:Label ID="lbl_publicKey" runat="server" Text=""></asp:Label></p>
            <p>Clé privée (n,d) : 
                <asp:Label ID="lbl_privateKey" runat="server" Text=""></asp:Label></p>
        </div>
    </div>
    <div>
        <h2>Chiffrage/Déchiffrage</h2>
        <div>
            <h3>Chiffrage</h3>
            <p>Message (entier) : <asp:TextBox ID="txt_cryptMess" runat="server" ></asp:TextBox></p>
            <asp:UpdatePanel ID="UpdatePanelCrypt" runat="server">
                <ContentTemplate>
                    <p>Récultat : <asp:Label ID="lbl_cryptResult" runat="server" Text=""></asp:Label></p>
                    <p><asp:Button ID="btn_crypt" runat="server" Text="Chiffrer" onclick="btn_crypt_Click" /></p>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div>
            <h3>Déchiffrage</h3>
            <p>Message (entier) : <asp:TextBox ID="txt_decryptMess" runat="server" ></asp:TextBox></p>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <p>Résultat <asp:Label ID="lbl_decryptResult" runat="server" Text=""></asp:Label></p>
                    <p><asp:Button ID="btn_decrypt" runat="server" Text="Déchiffrer"  onclick="btn_decrypt_Click" /></p>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>

</asp:Content>
